import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { ProductModule } from './server/product/product.module';
import { DataSource } from 'typeorm';
import { StockModule } from './server/stock/stock.module';
import { UserModule } from './server/user/user.module';
import { SystemModule } from './server/system/system/system.module';
import GlobalProvider from './common/GlobalProvider';
import GlobalModule from './common/GlobalModule';
import { ImageModule } from './server/system/image/image.module';

const ModuleList = [
  UserModule,
  ProductModule,
  StockModule,
  SystemModule,
  ImageModule,
]

@Module({
  imports: [...GlobalModule, ...ModuleList],
  controllers: [AppController],
  providers: [...GlobalProvider, AppService],
  exports: [],
})
export class AppModule {
  constructor(private dataSource: DataSource) { }
}
